Signing and ingress hardening - #11282
Conversation
⚡ Try this PR in the Web FlasherWarning This is an automated, unreviewed CI test build. Back up your device configuration Supported boards built by this PR (31)
Build artifacts expire on 2026-08-28. Updated for |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe changes broaden known-XEdDSA-signer checks for identity and receive-policy handling, reject encrypted UDP packets with excessive hop fields, and propagate Curve25519 encryption failures as routing errors. ChangesPacket security guards
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/mesh/NodeDB.cpp`:
- Around line 3507-3511: Condense the comment immediately above the node
identity check to no more than two lines while preserving that unsigned updates
cannot change known signer identities and that isKnownXeddsaSigner checks the
warm tier before rehydration. Keep the condition and surrounding behavior
unchanged.
In `@src/mesh/Router.cpp`:
- Around line 684-686: Update the rejection diagnostic associated with the
licensed-unicast condition in the Router.cpp handling around isKnownXeddsaSigner
so it reports a generic “packet” drop instead of calling every rejection a
“broadcast” drop. Keep the existing policy condition and behavior unchanged.
In `@src/mesh/udp/UdpMulticastHandler.h`:
- Around line 82-86: Update the invalid hop-count warning in UdpMulticastHandler
to format both byte-valued fields, mp.hop_limit and mp.hop_start, using the
required 0x%x format while preserving the existing drop behavior and message
context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1684ddc0-93e9-4591-b9a9-635bdee32f50
📒 Files selected for processing (4)
src/mesh/NodeDB.cppsrc/mesh/Router.cppsrc/mesh/udp/UdpMulticastHandler.hsrc/modules/NodeInfoModule.cpp
Condense the updateUser rationale to two lines and stop calling the Balanced-mode drop a broadcast now that licensed unicasts reach it.
* Include warm-tier signers in the identity update gate * Fail the send when PKI encryption fails * Require signatures on licensed unicasts * Include warm-tier signers in the NodeInfo downgrade drop * Clamp hop fields on UDP multicast ingress * Address review comments on signing hardening Condense the updateUser rationale to two lines and stop calling the Balanced-mode drop a broadcast now that licensed unicasts reach it. (cherry picked from commit df6e67f)
Five follow-ups from the post-release backlog, one commit each.
NodeDB::updateUserand the NodeInfo downgrade drop gated ongetMeshNode(), which is hot-store only, so a signer evicted to the warm tier could be identity-spoofed with an unsigned NodeInfo. Both now useisKnownXeddsaSigner(), matching the Router gate.perhapsEncodeignored the return ofencryptCurve25519(). On failureencrypted.bytesholds no ciphertext, so the plaintext went out labelledpki_encrypted.perhapsEncodegate.hop_limit/hop_startto HOP_MAX the way MQTT ingress does.Summary by CodeRabbit
Security Improvements
Bug Fixes